import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import { createPinia } from 'pinia'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
// 导入全局样式
import '@/styles/index.scss'
// 导入权限控制模块
import './permission'
// 注册 svg图标 插件
import 'virtual:svg-icons-register'
// 引入 echart
import VueEchart from '@/plugins/echart'

const pinia = createPinia()

const app = createApp(App)

app.use(pinia).use(router).use(VueEchart).mount('#app')

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
